<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Gym Rat | Create New Exercise</title>
</head>
<body>
<jsp:include page="/includes/nav.jsp" />

<h1>Create New Exercise</h1>
<h2>Before you begin...</h2>
<ul>
	<li>Make sure the exercise you have in mind isn't already on the <a
		href="<c:url value='/exercise/list' />">Exercise List</a>.</li>
	<li>Keep in mind that exercises with multiple variations are
	combined as one exercise on the list. e.g. "Incline Bench Press" is
	found under the "Bench Press" exercise, then you use the "Incline"
	variation.It may be better to simply create a <a
		href="<c:url value='/variation/create' />">New Variation</a> instead.</li>
	<li>If you are doing a variation of an exercise that changes the
	primary muscle involved, then it would be better to create a new
	exercise, e.g. "Close Grip Bench Press" is primarily triceps while
	"Bench Press" is primarily chest.</li>
	<li>The same goes for equipment. Don't create a "Barbell Bench
	Press", simple use bench press and select "Barbell" as your equipment
	when logging your workout</li>
</ul>

<h2>Tips</h2>
<ul>
	<li>Keep your exercise as general as possible, don't mention
	specific variations or equipment options.</li>
	<li>Select the variations and equipment that make sense for your
	exercise, or create new ones that do.</li>
</ul>

<form action="create/submit" method="post">Muscle Group: <select
	name="musclegroup">
	<c:forEach var="mg" items="${muscleGroups }">
		<option value="${mg.key }">${mg.value }</option>
	</c:forEach>
</select><br>
Name: <input type="text" name="name"><br>
<div class="tableSubHeader">Variations: <a class="headerLink"
	href="<c:url value='/variation/list' />">Add a New Variation</a></div>
<c:forEach var="variation" items="${variations }">
	<div class="checkBoxOption"><input type="checkbox"
		name="variationCheck" value="${variation.id }"
		id="variation_${variation.id}"> <label
		for="variation_${variation.id}">${variation.name}</label></div>
</c:forEach>

<div class="tableSubHeader">Equipment: <a class="headerLink"
	href="<c:url value='/equipment/list' />">Add New Equipment</a></div>
<c:forEach var="equipment" items="${equipment }">
	<div class="checkBoxOption"><input type="checkbox"
		name="equipmentCheck" value="${equipment.id }"
		id="equip_${equipment.id}"> <label for="equip_${equipment.id}">${equipment.name}</label>
	</div>
</c:forEach>
<div class="clear"><c:if test="${user.admin == true }">
	<input type="checkbox" name="publicexercise">Public
			Exercise?<br>
</c:if> <input type="button" onClick="submit()" value="Create"></div>
</form>
</body>
</html>